(cons
;; height
(if (member which-key-side-window-location '(left right))
- (- (frame-height) 1) ; 1 is for minibuffer
- ;; (window-height (minibuffer-window))
+ (- (frame-height) (window-text-height (minibuffer-window)) 1) ;; 1 is a kludge to make sure there is no overlap
;; (window-mode-line-height which-key--window))
;; FIXME: change to something like (min which-*-height (calculate-max-height))
- which-key-side-window-max-height)
+ (which-key/height-or-percentage-to-height which-key-side-window-max-height))
;; width
(if (member which-key-side-window-location '(left right))
- which-key-side-window-max-width
- (frame-width))))
+ (which-key/total-width-to-text (which-key/width-or-percentage-to-width
+ which-key-side-window-max-width))
+ (window-width (frame-root-window)))))
(defun which-key/frame-max-dimensions ()
(cons which-key-frame-max-height which-key-frame-max-width))